﻿
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title> 
    <link href="../../../../DataUser/Style/ccbpm.css" rel="stylesheet"  type="text/css" />
    <link href="../../../Scripts/easyUI/themes/default/easyui.css" rel="stylesheet" type="text/css" />
    <link href="../../../Scripts/easyUI/themes/icon.css" rel="stylesheet" type="text/css" />
    <script src="../../../Scripts/jquery-1.7.2.min.js" type="text/javascript"></script>
    <script src="../../../Scripts/easyUI/jquery.easyui.min.js" type="text/javascript"></script>
    <script src="../../../Scripts/QueryString.js" type="text/javascript"></script>
    <script type="text/javascript" src="../../../Scripts/config.js"></script>
    <script type="text/javascript" src="../../../Comm/Gener.js"></script>
    <script src="DDLBar.js" type="text/javascript"></script>
    <script src="../../CCFlowEnum.js" type="text/javascript"></script>
    <script src="../../../Scripts/EasyUIUtility.js" type="text/javascript"></script>

    <script  type="text/javascript">
        //页面初始化
        $(function () {

            InitBar(SelectorModel.SQL);
            var nodeID = GetQueryString("FK_Node");
            var node = new Entity("BP.WF.Template.Selector", nodeID);

            GenerFullAllCtrlsVal(node);

        });

        //装载模版.
        function LoadTemplate() {
            var url = "../../SettingTemplate.htm?TemplateType=NodeAccepterRole";
            WinOpen(url, 'ss');

        }

        function Save() {
            var nodeID = GetQueryString("FK_Node");
            var node = new Entity("BP.WF.Template.Selector", nodeID);            
            node.SelectorModel = SelectorModel.SQL;
            node.CopyForm();
            node.Update();
             
            alert("保存成功.");
        }
    </script>
</head>
<body >

<div id="bar"> </div>
<form id="cc">
<fieldset>
    <legend>分组SQL.</legend>
    <textarea id="TB_SelectorP1" name="TB_SelectorP1" rows="" cols="" style="width:95%;height:50px"></textarea>
</fieldset>

<fieldset>
    <legend>人员SQL.</legend>
    <textarea id="TB_SelectorP2" name="TB_SelectorP2" rows="" cols="" style="width:95%;height:50px"></textarea>
</fieldset>


<fieldset>
    <legend>默认选择SQL.</legend>
    <textarea id="TB_SelectorP3" name="TB_SelectorP3" rows="" cols="" style="width:95%;height:50px"></textarea>
</fieldset>


<fieldset>
    <legend>强制选择的数据源.</legend>
    <textarea id="TB_SelectorP4" name="TB_SelectorP4" rows="" cols="" style="width:95%;height:50px"></textarea>
</fieldset>

</form>
<fieldset>
    <legend>说明</legend>
    <ul>
           <li >该SQL是需要返回No,Name两个列，分别是人员编号,人员名称。</li>
           <li >SQL语句支持ccbpm表达式, 比如：SELECT No,Name FROM Port_Emp WHERE FK_Dept='@WebUser.FK_Dept' </li>
           <li >比如：SELECT No,Name FROM Port_Emp WHERE FK_Dept='@MyFieldName'   MyFieldName 必须是节点表单字段. </li>
           <li >什么是ccbpm表达式，请百度：ccbpm 表达式</li>
           <li ><a href="javascript:LoadTemplate();" >我要从模版里选择一个设置.</a></li>
   </ul>
</fieldset>

</body>
</html>
